<template>
        <div class="mui-numbox" data-numbox-min='1' data-numbox-max="100" style="height:25px">
            <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
            <input id="test" readonly class="mui-input-numbox" type="number" :value="defaultval" @change="change" ref="numboxinput"/>
            <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
		</div>
</template>
<style lang="scss" scoped>

</style>
<script>
import mui from "../../lib/mui/js/mui.min.js"
export default {
    data(){
        return {}
    },
    methods:{
        change(){
            var goodObj={
                id:this.goodid,
                count:this.$refs.numboxinput.value
            }
            this.$store.commit("updategood",goodObj);
        }
    },
    mounted(){
        mui(".mui-numbox").numbox();
    },
    props:["defaultval","goodid"]
}
</script>